www.gusucode.com > 基于Matlab的MIMO通信系统仿真 含报告;司中威;了解移动通信 > 基于Matlab的MIMO通信系统仿真 含报告;司中威;了解移动通信关键技术,了解数字通信系统仿真流程,实现基本的信道编译码、调制解调等通信模块。(好评如潮,课设拿满) 学习并实现MIMO空时处理技术 学习性能分析的思路和方法/mimo/matlab for mimo 2x2/compare_with_matlab.m

    % Run this program and follow the instructions to compare DSP and matlab
% implementations of the same function.

Input=(0:15)-(rand*15);
write_float32_hex('Input.dat',Input);
Input_short=0:3;
write_int16_hex('Input_short.dat',Input_short);
 

Output_Matlab=FunctionToBeTested(Input);

disp('1) Load the program.')
disp('2) Load data in DSP (File->Data->Load->"Input.dat"->Open->Adress=Input->OK) or use load.gel');
disp('3) Run DSP program.');
disp('4) Save data from DSP (File->Data->Save->"Output.dat"->Adress=Output,Length=16->OK) or use save.gel');
disp('5) Press any key in this matlab window');
pause

Output_DSP=read_float32_hex('Output.dat')

% Compare e.g. graphically
hold off
plot(Output_Matlab,'b')
hold on
plot(Output_DSP+0.1,'g')
legend('Matlab result','DSP result');